//
//  UILabel+CustomMJRefresh.m
//  QMCXDriver
//
//  Created by Massimo on 2017/4/15.
//  Copyright © 2017年 Massimo. All rights reserved.
//

#import "UILabel+CustomMJRefresh.h"
#import "MJRefreshComponent.h"
#import "ObjcRuntime.h"
@implementation UILabel (CustomMJRefresh)
+ (void)load{
    SEL origSel = NSSelectorFromString(@"mj_label");
    SEL newSel = NSSelectorFromString(@"swizzle_mj_label");
    Method newMethod = class_getClassMethod([self class], newSel);
    Method origMethod = class_getClassMethod([self class], origSel);
    method_exchangeImplementations(origMethod, newMethod);
}
+ (instancetype)swizzle_mj_label
{
    UILabel *label = [[self alloc] init];
    label.font = MJRefreshLabelFont;
    label.textColor = QRefreshLabelTextColor;
    label.autoresizingMask = UIViewAutoresizingFlexibleWidth;
    label.textAlignment = NSTextAlignmentCenter;
    label.backgroundColor = [UIColor clearColor];
    return label;
}
@end
